import axios from './http';

export default {
  login(params) {
    const url = '/auth/login';
    return new Promise((resolve, reject) => {
      axios.post(url, params).then(resp => {
        resolve(resp)
      });
    });
  },
  logout(params) {
    const url = '/auth/logout';
    return new Promise((resolve, reject) => {
      axios.get(`${url}`).then(data => {
        resolve(data)
      })
    });
  },
  identity(){
    const url = '/menu/nav';
    return new Promise((resolve, reject) => {
      axios.get(`${url}`).then(data => {
        resolve(data)
      })
    });
  }
};
